using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Dal.Entities;

namespace Dal.Mapping
{
	public class Doc1Map : EntityTypeConfiguration<Doc1>
	{
		public Doc1Map()
		{
			// Primary Key
			this.HasKey(t => t.DocID);

			// Properties
			this.Property(t => t.DocID)
				.HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);
				
			this.Property(t => t.IsFirstTime)
				.HasMaxLength(50);
				
			this.Property(t => t.OtherMedicine)
				.HasMaxLength(500);
				
			this.Property(t => t.Symptom)
				.HasMaxLength(150);
				
			this.Property(t => t.JiaolvFollow)
				.HasMaxLength(50);
				
			this.Property(t => t.HAMDScore)
				.HasMaxLength(50);
				
			this.Property(t => t.MADRSScore)
				.HasMaxLength(50);
				
			this.Property(t => t.OtherTableName)
				.HasMaxLength(50);
				
			this.Property(t => t.OtherScore)
				.HasMaxLength(50);
				
			this.Property(t => t.OtherConclusion)
				.HasMaxLength(100);
				
			this.Property(t => t.TreatDose)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionMedicineName1)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionMedicineName2)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionMedicineName3)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionMedicineCount1)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionMedicineCount2)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionMedicineCount3)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionReason)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionReason1Year)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionReason1Month)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionReason2Detail)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionReason3Detail)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionReason3DetailOther)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionReason4Other)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionTreatDose)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionSymptom)
				.HasMaxLength(100);
				
			// Table & Column Mappings
			this.ToTable("Doc1");
			this.Property(t => t.DocID).HasColumnName("DocID");
			this.Property(t => t.IsFirstTime).HasColumnName("IsFirstTime");
			this.Property(t => t.OtherMedicine).HasColumnName("OtherMedicine");
			this.Property(t => t.Symptom).HasColumnName("Symptom");
			this.Property(t => t.JiaolvFollow).HasColumnName("JiaolvFollow");
			this.Property(t => t.HAMDScore).HasColumnName("HAMDScore");
			this.Property(t => t.MADRSScore).HasColumnName("MADRSScore");
			this.Property(t => t.OtherTableName).HasColumnName("OtherTableName");
			this.Property(t => t.OtherScore).HasColumnName("OtherScore");
			this.Property(t => t.OtherConclusion).HasColumnName("OtherConclusion");
			this.Property(t => t.TreatDose).HasColumnName("TreatDose");
			this.Property(t => t.AdditionHistoryYear).HasColumnName("AdditionHistoryYear");
			this.Property(t => t.AdditionHistoryMonth).HasColumnName("AdditionHistoryMonth");
			this.Property(t => t.AdditionMedicineName1).HasColumnName("AdditionMedicineName1");
			this.Property(t => t.AdditionMedicineName2).HasColumnName("AdditionMedicineName2");
			this.Property(t => t.AdditionMedicineName3).HasColumnName("AdditionMedicineName3");
			this.Property(t => t.AdditionMedicineCount1).HasColumnName("AdditionMedicineCount1");
			this.Property(t => t.AdditionMedicineCount2).HasColumnName("AdditionMedicineCount2");
			this.Property(t => t.AdditionMedicineCount3).HasColumnName("AdditionMedicineCount3");
			this.Property(t => t.AdditionReason).HasColumnName("AdditionReason");
			this.Property(t => t.AdditionReason1Year).HasColumnName("AdditionReason1Year");
			this.Property(t => t.AdditionReason1Month).HasColumnName("AdditionReason1Month");
			this.Property(t => t.AdditionReason2Detail).HasColumnName("AdditionReason2Detail");
			this.Property(t => t.AdditionReason3Detail).HasColumnName("AdditionReason3Detail");
			this.Property(t => t.AdditionReason3DetailOther).HasColumnName("AdditionReason3DetailOther");
			this.Property(t => t.AdditionReason4Other).HasColumnName("AdditionReason4Other");
			this.Property(t => t.AdditionTreatDose).HasColumnName("AdditionTreatDose");
			this.Property(t => t.AdditionSymptom).HasColumnName("AdditionSymptom");
			this.Property(t => t.StatusAudit).HasColumnName("StatusAudit");
			this.Property(t => t.StatusComplete).HasColumnName("StatusComplete");
		}
	}
}

